package org.libraq.org.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.libraq.basic.domain.BaseDomain;

import java.util.ArrayList;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
public class Department extends BaseDomain {

      private String sn;
      private String name;
      private String dirPath;
      private Employee manager;
      private Department parent;
      private List<Department> children = new ArrayList<>();

      public Department(Long id, String sn, String name, String dirPath, Integer state, Employee manager, Department parent) {
            super(id,state);
            this.sn = sn;
            this.name = name;
            this.dirPath = dirPath;
            this.manager = manager;
            this.parent = parent;
      }

      public Department() {
            super();
      }

      public Department(Long id){
            super(id);
      }
}
